package com.joysuch.wwyt.api.alarmbluetooth.dto;

import lombok.Data;

/**
 * 开放平台返回参数
 *
 * @author smq
 * 2021-10-27 10:50:00
 */
@Data
public class OpenApiResult <T> {
    // 返回码
    private int errorCode;
    // 返回码
     private String [] errorMsg;
    // 返回数据
    private T data;

  public static  OpenApiResult  wrapErrorResult(int errorCode, String errorMessage){
        OpenApiResult rt = new OpenApiResult();
        rt.setErrorCode(errorCode);
        rt.setErrorMsg(new String[] {errorMessage});
       return rt;
    }

}
